#ifndef PROTO_H
#define PROTO_H

#include <iostream>
#include <string>
#include <list>
#include <string.h>

class ListeChaines
{
public:
    int nbChaines;
    char **listeChaines;

    ListeChaines(const int &nbChaines)
    {
        this->nbChaines = nbChaines;
        this->listeChaines = new char*[nbChaines];

    }

    void affiche()
    {
        std::cout<<"Nb de chaines : "<<nbChaines<<std::endl;
        for(int i = 0; i < nbChaines; ++i)
        {
            std::cout<<"Chaine "<<i<<": "<<listeChaines[i]<<'\n';
        }
        std::cout<<'\n';
    }
    void ajouter(int index,const char * string_to_add){
        this->listeChaines[index]= new char[strlen(string_to_add)+1];
        strcpy(this->listeChaines[index],string_to_add);

      }

};

struct QuestionQCM
{
    std::string question;
    std::list<std::string> reponses;
};

enum idMessage
{
    //MESSAGE_ID                PARAMETRES
    /* ETUDIANT FLECHE MASTER */
    ETUD_LOGIN = 10,            //Id_etudiant
    ETUD_CHOIX = 11,            //Id_salle
    SALLE_CLOSED = 12 ,         //
    ETUD_CHOIX_SALLE = 13 ,     //Id_Salle
    ETUD_CHOIX_ACTIVITE = 14 ,  //Id_Activite
    ETUD_LOGOUT = 15,           //
    ETUD_REP_QCM = 16,          //ListeReponse
    ETUD_REP_Q2 = 17 ,          //Reponse
    ETUD_REP_Q3 = 18 ,          //Reponse
    ETUD_AST_MSG = 19,          //Message

    /* MASTER FLECHE ETUDIANT */

    ETUD_ERR_LOGIN = 20,        //
    ETUD_LISTE = 21 ,           //ListeSalle
    ETUD_ERR_CHOIXSALLE= 22,    //
    ETUD_OK_CHOISALLE = 23,     //ListeActivite
    ETUD_ERR_CHOIX_ACTIVITE=24,  //
    ETUD_OK_CHOIX_ACTIVITE=25,   //
    AST_MSG = 26,               //Message
    AST_VOIP = 27,              //AstIP
    ETUD_QCM = 28 ,             //Question / ListeReponse
    ETUD_Q2 = 29  ,             //Question
    ETUD_Q3 = 30  ,             //QuestionOrale
    ETUD_Q4 = 31  ,             //Phrase
    ETUD_OBS_Q4  = 32 ,         //EtudID / Phrase
    ETUD_FIN_ACTIVITE = 33 ,    //

    /* OBSERVATEUR FLECHE MASTER */

    OBS_LOGIN =40 ,             //Id_OBS
    OBS_CHOIX = 41 ,            //Id_Salle
    OBS_ACTIVITES = 42 ,        //Liste_Activites
    OBS_LOGOUT = 43 ,           //
    //OBS_CHOIX_NVELLE_SALLE = 44,

    /* MASTER FLECHE OBSERVATEUR */

    OBS_ERR_LOGIN = 50,         //
    OBS_LISTE = 51 ,            //Liste Salle
    OBS_ERR_CHOIX = 52 ,        //
    OBS_OK_CHOIX = 53 ,         //
    OBS_OK_CHOIX_SALLE_CREE = 61 ,
    OBS_ACTIVITE_OK = 54 ,      // Listes des activites ouvertes
    ETUD_CHOIX_ACTIVITE_ = 55,   //Etud Id , Salle ID , Activite ID
    ETUD_LOGOUT_ = 56 ,          //Id_Etud                          //WARNING OVER THERE
    ETUD_FIN_ACTIVITE_ = 57 ,    //Id_Etud ,ActiviteEutud           //WARNING OVER THERE
    ETUD_OBS_REP_QCM = 58,      //Id_Etud , Qestion , LISTEREP
    ETUD_OBS_REP_Q2 = 59 ,      //Id_Etud , Question , Reponse
    ETUD_OBS_REP_Q3 = 60 ,      //Id_Etud , Question_Orale , Reponse

    /* MASTER FLECHE ASSISTANT */

    AST_ERR_LOGIN = 70 ,        //
    AST_OK_LOGIN = 71 ,         //
    AST_IP= 72 ,                //EtudId , EtudIP
    ETUD_AST_LOGOUT = 73,
    ETU_MSG = 74,               //Message

    /* ASSISTANT FLECHE MASTER */

    AST_LOGIN = 80 ,            //Assistant ID , ID Etud
    AST_LOGOUT = 81 ,           //
    AST_ETUD_MSG = 82 ,         // Message
    AST_ETU_VOIP = 83 ,         //
};

#endif // PROTO_H
